<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>卖家订单详情</title>
    <link rel="stylesheet" th:href="@{/webjars/bootstrap/3.0.1/css/bootstrap.min.css}" />
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-4 column">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>订单ID</th>
                    <th>金额</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>[[${orderMasterQuery.orderId}]]</td>
                    <td>[[${orderMasterQuery.orderAmount}]]</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 订单详情 -->
        <div class="col-md-12 column">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>商品ID</th>
                    <th>商品名称</th>
                    <th>价格</th>
                    <th>数量</th>
                    <th>总额</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="list : ${orderMasterQuery.orderDetailList}">
                    <td>[[${list.productId}]]</td>
                    <td>[[${list.productName}]]</td>
                    <td>[[${list.productPrice}]]</td>
                    <td>[[${list.productCount}]]</td>
                    <td>[[${list.productPrice * list.productCount}]]</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 按钮 -->
        <div class="col-md-12 column" th:if="${orderMasterQuery.getOrderStatusEnum().code == 0}">
            <!-- 完成订单 -->
            <a type="button" class="btn btn-default btn-primary"
               th:href="@{'seller/order/finish?orderId=' + ${orderMasterQuery.orderId}}">完成订单</a>
            <!-- 取消订单 -->
            <a type="button" class="btn btn-default btn-danger"
               th:href="@{'seller/order/cancel?orderId=' + ${orderMasterQuery.orderId}}">取消订单</a>
        </div>
    </div>
</div>
</body>
</html>